/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.jacusoft.annotation;

import javax.lang.model.element.Element;
import javax.lang.model.element.TypeElement;
import javax.lang.model.util.SimpleElementVisitor7;

/**
 *
 * @author bc548
 */
public class StringFieldVisitor extends SimpleElementVisitor7<String, Void> {

  public StringFieldVisitor() {
    super();
  }

  @Override
  public String defaultAction(Element e, Void param) {
    String fieldName = e.getSimpleName().toString();
    String className = ((TypeElement) e.getEnclosingElement()).getQualifiedName().toString();
    //
//    Object valor = null;
//    try {
//      Class classe = Class.forName(className);
//      valor = classe.getDeclaredField(fieldName).get(classe);
//    } catch (Exception ex) {
//      ex.printStackTrace();
//    }

    return e.toString();
  }
  
}
